// 基础路径
// const baseURL  = 'http://192.168.13.153:8080';//徐向军
// const baseURL  = 'http://192.168.13.127:8024';//牛宇航
const baseURL  = 'https://zhnc.pcippc.com/api';//正式环境
// const baseURL  = 'http://114.115.150.248:8024';//正式环境
const request =(e)=>{
	let options ={
		url:'',
		method:'get',
		data:{},
		header:{},
		timeout:60000
	};
	Object.assign(options,e)
	return new Promise((resolve,reject)=>{
		uni.request({
			url:baseURL+'/'+options.url,
			method:options.method,
			data:options.data,
			header:options.header,
			timeout:options.timeout,
			success(res){
				resolve(res)
			},
			fail(err) {
				reject(err)
			}
		})
	})
}
export default request